<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppControlTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_control', function (Blueprint $table) {
            $table->increments('id');
            $table->string("title",50)->default('')->comment("更新标题");
            $table->string("target_version",15)->default('')->comment("目标版本");
            $table->string("app_client",15)->default('')->comment("客户端");
            $table->string("channel",15)->default('')->comment("下载渠道");
            $table->string("download_url",150)->default('')->comment("下载地址");
            $table->tinyInteger("open_weixin_login",1)->default(0)->comment("是否开启微信登陆");
            $table->tinyInteger("open_update_hint",1)->default(0)->comment("是否开启更新提示");
            $table->tinyInteger("open_update_execute",1)->default(0)->comment("是否强制更新");
            $table->string("update_hint_content",100)->default('')->comment("更新提示语");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('app_control');
    }
}
